package jnpf.form.fallback;

import jnpf.base.ActionResult;
import jnpf.constant.MsgCode;
import jnpf.entity.FlowFormEntity;
import jnpf.form.FlowFormDataApi;
import jnpf.model.flow.DataModel;
import jnpf.model.flow.FlowFormDataModel;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * api接口
 *
 * @author JNPF开发平台组
 * @version V3.1.0
 * @copyright 引迈信息技术有限公司（https://www.jnpfsoft.com）
 * @date 2021/3/15 11:55
 */
@Component
public class FlowFormDataApiFallback implements FlowFormDataApi {

     @Override
     public ActionResult saveOrUpdate(FlowFormDataModel flowFormDataModel) {
          return ActionResult.fail(MsgCode.FA037.get());
     }

     @Override
     public ActionResult info(FlowFormDataModel flowFormDataModel) {
          ActionResult result = new ActionResult();
          result.setCode(400);
          result.setMsg(MsgCode.FM002.get());
          return result;
     }


     @Override
     public List<FlowFormEntity> getFlowIdList(String flowId) {

          System.out.println("进入了空的方法");
          return new ArrayList<>();
     }

     @Override
     public void updateForm(FlowFormEntity model) {

     }

     @Override
     public ActionResult saveFlowIdByFormIds(String flowId, List<String> formIds) {
          return null;
     }

     @Override
     public FlowFormEntity getById(String formId) {
          return null;
     }

     @Override
     public ActionResult saveOrUpdate(FlowFormEntity flowFormEntity) {
          return ActionResult.fail(MsgCode.FA037.get());
     }

     @Override
     public void remobeById(String id) {

     }

     @Override
     public void saveLogicFlowAndForm(String id) {

     }
}
